As the topic says, I need to write a program that raises a matrix to a user selected power. And do it by using a class Matrix and defining a function operator (^). Here's what I have so far to start with:

Code:
#include <iostream> 
#include <fstream> 
#include <iomanip>
#include <string>
using namespace std;
 
int main() 
{ 
  Matrix m;
  int n;
  string filename;
 
  :
 
  ifstream InputFile (filename.c_str(), ios::in);
  InputFile >> m;
  InputFile.close();
 
  :
 
  cout << "Matrix "    << endl << m     << endl;
  cout << "Matrix ^ n" << endl << (m^n) << endl;
 
  return 0;
}
The semicolons mark where I should ask for and receive the file to read the matrix from, and then ask and receive the integer to raise the matrix to.

So now I've got to define the class Matrix and the operator...I think that's it. Appreciate any help you can give.